﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiSubEntityTraitsData : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiSubEntityTraitsData(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiSubEntityTraitsData obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiSubEntityTraitsData()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiSubEntityTraitsData(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdGiSubEntityTraitsData() : this(GlobalsPINVOKE.new_OdGiSubEntityTraitsData(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public ushort flags()
		{
			ushort result = GlobalsPINVOKE.OdGiSubEntityTraitsData_flags(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public ushort selFlags()
		{
			ushort result = GlobalsPINVOKE.OdGiSubEntityTraitsData_selFlags(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isLayerFrozen()
		{
			bool result = GlobalsPINVOKE.OdGiSubEntityTraitsData_isLayerFrozen(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isLayerOff()
		{
			bool result = GlobalsPINVOKE.OdGiSubEntityTraitsData_isLayerOff(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isLayerVisible()
		{
			bool result = GlobalsPINVOKE.OdGiSubEntityTraitsData_isLayerVisible(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool visibility()
		{
			bool result = GlobalsPINVOKE.OdGiSubEntityTraitsData_visibility(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdCmEntityColor trueColor()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiSubEntityTraitsData_trueColor(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public ushort color()
		{
			ushort result = GlobalsPINVOKE.OdGiSubEntityTraitsData_color(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbStub layer()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiSubEntityTraitsData_layer(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbStub lineType()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiSubEntityTraitsData_lineType(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGiFillType fillType()
		{
			OdGiFillType result = (OdGiFillType)GlobalsPINVOKE.OdGiSubEntityTraitsData_fillType(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public LineWeight lineWeight()
		{
			LineWeight result = (LineWeight)GlobalsPINVOKE.OdGiSubEntityTraitsData_lineWeight(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double lineTypeScale()
		{
			double result = GlobalsPINVOKE.OdGiSubEntityTraitsData_lineTypeScale(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double thickness()
		{
			double result = GlobalsPINVOKE.OdGiSubEntityTraitsData_thickness(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public PlotStyleNameType plotStyleNameType()
		{
			PlotStyleNameType result = (PlotStyleNameType)GlobalsPINVOKE.OdGiSubEntityTraitsData_plotStyleNameType(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbStub plotStyleNameId()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiSubEntityTraitsData_plotStyleNameId(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbStub material()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiSubEntityTraitsData_material(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGiMapper mapper()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiSubEntityTraitsData_mapper(this.swigCPtr);
			OdGiMapper result = (intPtr == IntPtr.Zero) ? null : new OdGiMapper(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbStub visualStyle()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiSubEntityTraitsData_visualStyle(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdCmTransparency transparency()
		{
			OdCmTransparency result = new OdCmTransparency(GlobalsPINVOKE.OdGiSubEntityTraitsData_transparency(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public uint drawFlags()
		{
			uint result = GlobalsPINVOKE.OdGiSubEntityTraitsData_drawFlags(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool selectionGeom()
		{
			bool result = GlobalsPINVOKE.OdGiSubEntityTraitsData_selectionGeom(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGiSubEntityTraits.ShadowFlags shadowFlags()
		{
			OdGiSubEntityTraits.ShadowFlags result = (OdGiSubEntityTraits.ShadowFlags)GlobalsPINVOKE.OdGiSubEntityTraitsData_shadowFlags(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool sectionable()
		{
			bool result = GlobalsPINVOKE.OdGiSubEntityTraitsData_sectionable(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGiSubEntityTraits.SelectionFlags selectionFlags()
		{
			OdGiSubEntityTraits.SelectionFlags result = (OdGiSubEntityTraits.SelectionFlags)GlobalsPINVOKE.OdGiSubEntityTraitsData_selectionFlags(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdCmEntityColor secondaryTrueColor()
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdGiSubEntityTraitsData_secondaryTrueColor(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGiDgLinetypeModifiers lineStyleModifiers()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiSubEntityTraitsData_lineStyleModifiers(this.swigCPtr);
			OdGiDgLinetypeModifiers result = (intPtr == IntPtr.Zero) ? null : new OdGiDgLinetypeModifiers(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setFlags(ushort flags)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setFlags(this.swigCPtr, flags);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setSelFlags(ushort selFlags)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setSelFlags(this.swigCPtr, selFlags);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setTrueColor(OdCmEntityColor trueColor)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setTrueColor(this.swigCPtr, OdCmEntityColor.getCPtr(trueColor));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setColor(ushort colorIndex)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setColor(this.swigCPtr, colorIndex);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLayer(OdDbStub layerId)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setLayer(this.swigCPtr, OdDbStub.getCPtr(layerId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLineType(OdDbStub lineTypeId)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setLineType(this.swigCPtr, OdDbStub.getCPtr(lineTypeId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setFillType(OdGiFillType fillType)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setFillType(this.swigCPtr, (int)fillType);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLineWeight(LineWeight lineWeight)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setLineWeight(this.swigCPtr, (int)lineWeight);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLineTypeScale(double lineTypeScale)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setLineTypeScale(this.swigCPtr, lineTypeScale);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setThickness(double thickness)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setThickness(this.swigCPtr, thickness);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setPlotStyleName(PlotStyleNameType plotStyleNameType, OdDbStub pPlotStyleNameId)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setPlotStyleName(this.swigCPtr, (int)plotStyleNameType, OdDbStub.getCPtr(pPlotStyleNameId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setMaterial(OdDbStub materialId)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setMaterial(this.swigCPtr, OdDbStub.getCPtr(materialId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setMapper(OdGiMapper pMapper)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setMapper(this.swigCPtr, OdGiMapper.getCPtr(pMapper));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setVisualStyle(OdDbStub visualStyleId)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setVisualStyle(this.swigCPtr, OdDbStub.getCPtr(visualStyleId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setTransparency(OdCmTransparency transparency)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setTransparency(this.swigCPtr, OdCmTransparency.getCPtr(transparency));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setDrawFlags(uint drawFlags)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setDrawFlags(this.swigCPtr, drawFlags);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setSelectionGeom(bool bSelectionFlag)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setSelectionGeom(this.swigCPtr, bSelectionFlag);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setShadowFlags(OdGiSubEntityTraits.ShadowFlags shadowFlags)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setShadowFlags(this.swigCPtr, (int)shadowFlags);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setSectionable(bool bSectionableFlag)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setSectionable(this.swigCPtr, bSectionableFlag);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setSelectionFlags(OdGiSubEntityTraits.SelectionFlags selectionFlags)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setSelectionFlags(this.swigCPtr, (int)selectionFlags);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setSecondaryTrueColor(OdCmEntityColor trueColor)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setSecondaryTrueColor(this.swigCPtr, OdCmEntityColor.getCPtr(trueColor));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setLineStyleModifiers(OdGiDgLinetypeModifiers pLSMod)
		{
			GlobalsPINVOKE.OdGiSubEntityTraitsData_setLineStyleModifiers(this.swigCPtr, OdGiDgLinetypeModifiers.getCPtr(pLSMod));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public const int kLayerOff = 1;

		public const int kLayerFrozen = 2;

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;
	}
}
